from django import template
import datetime


register = template.Library()
def ride(values,discount):
    return round(values*discount, 2)
register.filter('ride', ride)



def index_time(data):
    return str(data)[0:12]
register.filter('data', index_time)



def phone_hidden(phone):
    p = phone[0:3]+'****'+phone[7:]
    return p
register.filter('hidden', phone_hidden)